﻿using System.Collections.Generic;
using MediaBrowserSL.BOL;

namespace MediaBrowserSL.IDAL
{
    public interface IMediaRepository
    {
        /// <summary>
        /// Return list of Media
        /// </summary>
        /// <returns></returns>
        IEnumerable<Media> GetListMediasByCategory(int idUser, int idCategory);

        /// <summary>
        /// Return list of Media Item
        /// </summary>
        /// <returns></returns>
        IEnumerable<Media> GetListMediaItems(int idMedia, int idUser, int idCategory);

        /// <summary>
        /// Create New Media
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        Media CreateMedia(Media m, User u);

        /// <summary>
        /// Update  Media
        /// </summary>
        /// <param name="m"></param>
        void UpdateMedia(Media m);

        /// <summary>
        /// Delete  Media
        /// </summary>
        /// <param name="m"></param>
        void DeleteMedia(Media m);

        /// <summary>
        /// Create Media Item
        /// </summary>
        /// <param name="mediaItem"></param>
        /// <param name="mediaParent"></param>
        /// <param name="u"></param>
        /// <returns></returns>
        Media CreateMediaItem(Media mediaItem, Media mediaParent, User u);

        /// <summary>
        /// Get Sum Size By Category
        /// </summary>
        /// <param name="u"></param>
        /// <param name="idCategory"></param>
        /// <returns></returns>
        double GetSizeByCategory(User u, int idCategory);

    }
}
